# Contributor: Thomas Kienlen <kommander@laposte.net>
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=go-passbolt-cli
pkgver=0.3.0
pkgrel=2
pkgdesc="Command-line tool to interact with Passbolt"
url="https://github.com/passbolt/go-passbolt-cli"
arch="all"
license="MIT"
makedepends="go"
source="
	https://github.com/passbolt/go-passbolt-cli/archive/v$pkgver/go-passbolt-cli-$pkgver.tar.gz
	passbolt-cli-helper.sh
	"

export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	go build -o go-passbolt-cli
}

check() {
	go test -v ./...
}

package() {
	install -Dm755 go-passbolt-cli "$pkgdir"/usr/bin/go-passbolt-cli
	install -Dm755 "$srcdir"/passbolt-cli-helper.sh "$pkgdir"/usr/bin/passbolt-cli-helper
}

sha512sums="
5ea3bec1b4d703412cdf94723f4b80d34f81fe3f2ac79abccc3a1e085a2b6481f512f6f8bb8f072da8fc47f119c8bcecac64d8e88983c6a56b7137f2329ac52c  go-passbolt-cli-0.3.0.tar.gz
93daf603af9945e70cd009eb7a9326049622299b3f1f55b41ae98f1eaa07ce8778d27915bf1e96aa7b7d34c492ab0ce11d8481f616b9ca464e497b82bd18289f  passbolt-cli-helper.sh
"
